package com.jic.market.service.rest.discount;

import com.jic.market.entity.PromotionRuleEntity;
import com.jic.market.response.rest.discount.GiftDetail;

import java.util.List;

/**
 * @author yinhaijun
 * @date: 2020/5/12
 */
public interface GiftService {

    List<GiftDetail> getGiftDetails(String promotionId, String promotionCode, String thirdUserId, PromotionRuleEntity promotionRuleEntity, Long overlayAppNum);

    // 取请求的和本身的交集
    List<GiftDetail> getMixedGiftDetails(List<GiftDetail> requestGiftDetailList, List<GiftDetail> giftDetailList);

    // 发放礼物
    void issuanceGift(List<GiftDetail> giftDetailList, String thirdUserId);

    // 回收礼物
    void recycleGift(List<GiftDetail> giftDetailList, String thirdUserId);

    Long getUsedNum(Long num, Long channelStoreLimit, Long channelIndividualLimit, Long userCountNum, Long countNum);

}
